﻿using System;

class FirstElementBiggerThanNeighbours
{
    static void Main()
    {
        int[] array = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 119, 120, 13335, 1256 };

        int result = isItBiggerThanNeighbours(array);

        Console.WriteLine("The index of the element is: {0}", result);
    }

    private static int isItBiggerThanNeighbours(int[] array)
    {
        int result = -1;
        for (int i = 0; i < array.Length; i++)
        {
            if (i > 0 && i < array.Length - 1)
            {
                if (array[i-1] < array[i] && array[i + 1] < array[i])
                {
                    result = i;
                    break;
                }
            }
        }

        return result;
    }
}